package com.travelgroup.constant;

import java.util.HashMap;
import java.util.Map;

public class ScenicSpotConstant {
    // 休闲娱乐大类
    public static final String LEISURE = "180300";

    // 具体景点类型
    public static final Map<String, String> TYPE_MAPPING = new HashMap<>();
    public static final Map<String, String> TRANSPORTATION_MAPPING = new HashMap<>();
    public static final Map<String, String> HOTEL_MAPPING = new HashMap<>();
    public static final Map<String, String> FOOD_MAPPING = new HashMap<>();

    static {
        // 休闲度假相关
        TYPE_MAPPING.put("休闲度假", "180300");

        // 风景名胜
        TYPE_MAPPING.put("风景名胜", "180400");

        // 文化场馆
        TYPE_MAPPING.put("文化", "160200");

        TYPE_MAPPING.put("自然地物", "260200");

        // 交通相关
        TRANSPORTATION_MAPPING.put("货运交通", "230100");

        // 住宿相关
        HOTEL_MAPPING.put("商业性住宿", "120100");

        // 饮食相关
        FOOD_MAPPING.put("餐馆", "110100");

    }

    /**
     * 获取所有景点类型的数据类型编码
     */
    public static String getAllScenicTypes() {
        return String.join(",", TYPE_MAPPING.values());
    }

    public static String getAllTransportationTypes() { return String.join(",", TRANSPORTATION_MAPPING.values()); }

    public static String getAllHotelTypes() {return String.join(",", HOTEL_MAPPING.values()); }

    public static String getAllFoodTypes() {return String.join(",", FOOD_MAPPING.values()); }

    /**
     * 根据中文类型名称获取数据类型编码
     */
    public static String getTypeCode(String typeName) {
        return TYPE_MAPPING.getOrDefault(typeName, "");
    }
}
